<?php

namespace App\Repositories;

use App\Models\Menu;
use App\Exceptions\InvalidException;
use DB;
use Hash;
use App\Models\ProductSku;
class ProductSkuRepo
{
	public function create($product_id,$data)
	{
		foreach ($data as &$sku) {
			$sku['product_id'] = $product_id;
		}
		ProductSku::insert($data);
	}
	public function edit($product_id,$data)
	{
		ProductSku::where('product_id',$product_id)->delete();

		$this->create($product_id,$data);
	}
}